<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<%@include file="/WEB-INF/pages/common/taglibs.jsp"%>
<script type="text/javascript" src="${ctx}resources/js/jquery.uploadify-3.1.min.js"></script>
<script type="text/javascript" src="${ctx}resources/js/jquery.jeditable.js"></script>
<link rel="stylesheet" type="text/css" href="${ctx}resources/css/uploadify.css" /> 
<title>测试上传组件</title>
<script type="text/javascript">
$(function() {
	 $('#upload').click(function() {
         $('#uploadify').uploadifyUpload();
             return false;
         });
    $('#uploadify').uploadify({
    	 'formData': {'id':'1','uploader':'avatar'},
        'swf': '${ctx}resources/js/uploadify.swf',
        'method':'post',
        'buttonText':'上传',
        'fileObjName':'attachment',
        'uploader':'${ctx}attach/pic/upload.htm;jsessionid=${sessionId}',
        'onUploadError': function(a, b, c, d){
        	alert("上传失败");
        },'onUploadSuccess' : function(file, data, response) {
            alert(data);
        }
    });
    
    
   
    	 //以下是可编辑插件使用例子
        $(".dblclick").editable("http://www.appelsiini.net/projects/jeditable/php/echo.php", { 
            tooltip   : "双击可编辑选项！",
            event     : "dblclick",
      	    type      : "textarea",
            style  : "inherit"
    });
   
});
</script>
</head>
<body>
<input type="file" name="attachment" id="uploadify" /><br><br>
uploadify api地址:http://www.uploadify.com/documentation/
<br><br><br>
<table border="1px;" style="width: 100%">
	<tr>
		<th width="50%">TITLE</th>
		<th width="50%">描述</th>
	</tr>
	<tr>
		<td align="left"  class="dblclick"  title="双击可编辑选项！"><a href="http://www.baidu.com">this is title</a></td>
		<td class="dblclick"  title="双击可编辑选项！">werwerxsdfswsse<div  class="dblclick"  title="双击可编辑选项！"></div></td>
	</tr>
	<tr></tr>
</table>
<div ><a href="javascript:void(0)" link="http://baidu.com">双击这里可以编辑</a></div><br><br><br><br>
jeditable地址:http://www.appelsiini.net/projects/jeditable
</body>
</html>